home *** CD-ROM | disk | FTP | other *** search
/ ASP Advantage 1994 2nd Q2 / The Association of Shareware Professionals - The Official ASP Advantage (2nd Quarter)(1994).bin / files / progming / sppbc3 / break.h next >
Encoding:
C/C++ Source or Header  |  1992-05-10  |  1.3 KB  |  56 lines

  1. #ifndef _BREAK_H
  2. #define _BREAK_H
  3. //============================================================================
  4. //
  5. //  BREAK.H
  6. //
  7. //  Source include file for class BreakTrap
  8. //  Serial++ Library SPP.LIB Ver. 1.10
  9. //
  10. //  Copyright (c) 1991,1992 Cortlandt Technologies, All rights reserved.
  11. //
  12. //     Cortlandt Technologies, P.O. Box 195, Pleasantville NY 10570
  13. //
  14. //  Please direct all inquiries to the above address,
  15. //  or via Compuserve: 71066,155
  16. //
  17. //============================================================================
  18.  
  19.     struct BreakAnchor;
  20.  
  21.     class BreakTrap
  22.         {
  23.         private:
  24.  
  25.         BreakAnchor     *ba;
  26.  
  27.         static void capture(void);
  28.         static void release(void);
  29.  
  30.         public:
  31.  
  32.         BreakTrap(void);        // first occurence sets trap
  33.                         // subsequent one point
  34.  
  35.         ~BreakTrap(void);        // deletes instance
  36.                         // if owner, releases trap
  37.  
  38.         void reset(void);        // clear flag
  39.  
  40.         int isBreak(void);        // true when flag set
  41.  
  42.         unsigned int breakCt(void);    // counts accumulated hits
  43.  
  44.         int isCaptured(void);        // true if trap set
  45.  
  46.         int isOwner(void);        // true if this instance
  47.                                                          // is owner of trap
  48.  
  49.         int operator()(void);        // true if trap is set and
  50.                         // flag is true;
  51.                         // resets flag
  52.         };
  53.  
  54. //============================================================================
  55. #endif
  56.